export const objToStr = obj => {
    if (typeof obj !== 'object' || !obj) return '';
    const arr: string[] = [];
    Object.entries(obj).forEach(([key, value]) => {
        if (value === 0 || value) arr.push(`${key}=${value}`);
    });
    return arr.length ? `?${arr.join('&')}` : '';
};
